// 将表单数据序列化成json字符串
function serializeForm(_selector) {
	var serializeObj = serializeFormJSON(_selector);
	var jsonParam = JSON.stringify(serializeObj);
	return jsonParam;
}

// 将表单数据序列化成json对象
function serializeFormJSON(_selector) {
	var serializeObj = {};
	$($(_selector).serializeArray()).each(function() {
		if(this.value != '') {
			if(serializeObj[this.name]) {
				serializeObj[this.name] = serializeObj[this.name] + ',' + this.value;
			} else {
				serializeObj[this.name] = this.value;
			}
		}
	});
	return serializeObj;
}

